Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>JScript.Encode</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/JScript.Encode"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-JScript_Encode rootpage-JScript_Encode skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">JScript.Encode</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p><b>JScript.Encode</b> is a method created by <a href="Microsoft" title="Microsoft">Microsoft</a> used to <a href="Obfuscation_(software)" title="Obfuscation (software)">obfuscate</a> both server and <a href="Client-side_JavaScript" class="mw-redirect" title="Client-side JavaScript">Client-side JavaScript</a> or <a href="VB_Script" class="mw-redirect" title="VB Script">VB Script</a> source code in order to protect the <a href="Source_code" title="Source code">source code</a> from <a href="Copying" title="Copying">copying</a>.<sup id="cite_ref-msse_1-0" class="reference"><a href="#cite_note-msse-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> JavaScript code is used for creating <a href="Dynamic_web_content" class="mw-redirect" title="Dynamic web content">dynamic web content</a> on many websites, with the source code easily viewable, so this was meant to protect the code.
</p><p>The encoding is a simple <a href="Polyalphabetic_substitution" class="mw-redirect" title="Polyalphabetic substitution">polyalphabetic substitution</a> using three alphabets.<sup id="cite_ref-vc_2-0" class="reference"><a href="#cite_note-vc-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="How_to_use">How to use</h2></div>
<p>A <a href="Command_line" class="mw-redirect" title="Command line">command line</a> script encoder can be used to encode scripts.<sup id="cite_ref-msse_1-1" class="reference"><a href="#cite_note-msse-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> To encode a <a href="HTML" title="HTML">HTML</a> web-page file called <style data-mw-deduplicate="TemplateStyles:r886049734">
/* start https://en.wikipedia.org/ */


.mw-parser-output .monospaced{font-family:monospace,monospace}


/* end https://en.wikipedia.org/ */
</style><span class="monospaced">default.htm</span>, use the following command:
</p>
<pre>screnc.exe default.htm defaultenc.htm
</pre>
<p>It would output to a file called <span class="monospaced">defaultenc.htm</span>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Weaknesses">Weaknesses</h2></div>
<p>It has been <a href="Reverse_engineering" title="Reverse engineering">reverse engineered</a><sup id="cite_ref-vc_2-1" class="reference"><a href="#cite_note-vc-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> and many websites provide an on-the-fly decoder.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-msse-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-msse_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-msse_1-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFClinick1999" class="citation web cs1">Clinick, Andrew (Aug 1999). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20021214024403/http://www.microsoft.com/mind/0899/scriptengine/scriptengine.asp">"Script Encoding with the Microsoft Script Engine Version 5.0"</a>. <i>Script Engine</i>. Microsoft. Archived from <a rel="nofollow" class="external text" href="http://www.microsoft.com/mind/0899/scriptengine/scriptengine.asp">the original</a> on 2002-12-14.</cite></span>
</li>
<li id="cite_note-vc-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-vc_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-vc_2-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20131208110057/http://virtualconspiracy.com/content/articles/breaking-screnc">"Breaking the Windows Script Decoder"</a>. <i>Virtual Conspiracy</i>. Archived from <a rel="nofollow" class="external text" href="http://virtualconspiracy.com/content/articles/breaking-screnc">the original</a> on 2013-12-08. <q><small>Security by obscurity is a bad, bad idea. Instead of encouraging that approach, Microsoft should educate programmers to find other ways to store their passwords and sensitive data, and tell them that an algorithm or any other piece of code that needs to be 'hidden', is just bad design</small></q></cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite id="CITEREFClinick1999" class="citation web cs1">Clinick, Andrew (Aug 1999). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20021214024403/http://www.microsoft.com/mind/0899/code/Clinick0899.exe">"Clinick0899.exe"</a>. Microsoft. Archived from <a rel="nofollow" class="external text" href="http://www.microsoft.com/mind/0899/code/Clinick0899.exe">the original</a> <span class="cs1-format">(program)</span> on 2002-12-14. <q><small>The command-line script encoder (screnc.exe) provides a simple mechanism for encoding HTML, ASP, SCT, VBScript, and JScript files. The Microsoft Script group developed it as an easy-to-use command-line tool that can be easily built into your existing deployment batch files</small></q></cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite id="CITEREFLee2012" class="citation web cs1">Lee, Grey (Feb 15, 2012). <a rel="nofollow" class="external text" href="https://gist.github.com/bcse/1834878">"Windows Script Decoder"</a>. <i>GitHub</i>. <q>Decoding <code>JScript.Encoded</code></q></cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="https://gist.github.com/bcse/1834878">Windows Script Decoder</a></li></ul>
<style data-mw-deduplicate="TemplateStyles:r1271159938">
/* start https://en.wikipedia.org/ */


.mw-parser-output .asbox{position:relative;overflow:hidden}.mw-parser-output .asbox table{background:transparent}.mw-parser-output .asbox p{margin:0}.mw-parser-output .asbox p+p{margin-top:0.25em}.mw-parser-output .asbox-body{font-style:italic}.mw-parser-output .asbox-note{font-size:smaller}.mw-parser-output .asbox .navbar{position:absolute;top:-0.75em;right:1em;display:none}.mw-parser-output :not(p):not(.asbox)+style+.asbox,.mw-parser-output :not(p):not(.asbox)+link+.asbox{margin-top:3em}


/* end https://en.wikipedia.org/ */
</style></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-05-29" href="https://en.wikipedia.org/wiki/?title=JScript.Encode&amp;oldid=1292911231">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>